#include "../include/DictProducer.hpp"
#include "../include/PageLib.hpp"
#include "../include/PageLibPreprocessor.hpp"
#include "../include/Configuration.hpp"
#include <iostream>
using std::cout;
Configuration* Configuration::pCnof = nullptr;
Configuration::AutoRelease Configuration::release;


int main()
{
    DictProducer produce;
    produce.buildEnDict();
    produce.buildCnDict();
    produce.enStore("../lib/endict.dat", "../lib/enindex.dat");
    produce.cnStore("../lib/cndict.dat", "../lib/cnindex.dat");
    
    Configuration* pCnof = Configuration::getInstance();
    PageLib pagelib(pCnof);
    pagelib.create();
    vector<WebPage>& wb = pagelib.getWebPages();
    PageLibPreprocessor processor(wb);
    processor.doProcess();
    //目前没真正执行倒排索引，有问题
    processor.storeOnDisk();

}

